package com.course.server.exception;

import com.course.server.common.ResultEnum;
import lombok.Getter;

import java.io.Serializable;

/**
 * @author: Durian
 * @date: 2021/4/24 21:26
 */
@Getter
public class ChapterException extends RuntimeException  implements Serializable {

    private static final long serialVersionUID = 1L;

    private int code;
    private String msg;

    public ChapterException() {
        super();
    }

    public ChapterException(ResultEnum errorCode){
        super(errorCode.getMsg());
        this.code = errorCode.getCode();
        this.msg = errorCode.getMsg();
    }
}
